﻿using System;
using OneMG.Phoenix.Entity;
using OneMG.Phoenix.Respository;
using IBatisNet.DataMapper;
using OneMG.Phoenix.Kernel.IBatisUtil;

namespace OneMG.Phoenix.IBatisRepository
{
    public class AdminGroupRightRepository : BaseIBatisDao,IAdminGroupRight
    {
        public AdminGroupRightRepository()
            : base("yihaoke_newMap.Config")
        {

        }
        public System.Int32 AddAdminGroupRight(EAdminGroupRight entity)
        {
			string stmtId = "AdminGroupRightMap.InsertAdminGroupRight";
			 Object obj = base.SqlMapper.Insert(stmtId, entity);
			 return (System.Int32)obj;
        }
        
		public  EAdminGroupRight GetByAdminGroupRightID (System.Int32 adminGroupRightID)
        {
			string stmtId = "AdminGroupRightMap.SelectByAdminGroupRightID";
			return base.SqlMapper.QueryForObject<EAdminGroupRight>(stmtId, adminGroupRightID);
        }
        
        public  void DeleteByAdminGroupRightID (System.Int32 adminGroupRightID)
        {
			string stmtId = "AdminGroupRightMap.DeleteByAdminGroupRightID";
			base.SqlMapper.Update(stmtId, adminGroupRightID);
        }
        
        public  void UpdateByAdminGroupRightID (EAdminGroupRight entity)
        {
			string stmtId = "AdminGroupRightMap.UpdateByAdminGroupRightID";
			base.SqlMapper.Update(stmtId, entity);
        }

    }
}

